package com.example.demo.User;

import com.example.demo.Course.Course;

import java.util.ArrayList;
import java.util.List;

public class User {
    private String id;
    private String name;
    List<Course> arr= new ArrayList<Course>();
    public Boolean addcourse(Course course) {
        return arr.add(course);
    }
    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    private String identity;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    private String password;

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Course> getSelectedCourses() {
        return arr;
    }

    public User() {}

    public User(String id, String name, String identity, String password) {
        this.id = id;
        this.name = name;
        this.identity = identity;
        this.password = password;
    }
}
